#!/bin/bash
cd /server
start_qd="/server/qd"
if [ ! -x "start_qd" ]; then
  echo "===============firsr start=============="
  echo "===============set chmod================"
  chmod +x /server/logservice/logservice
  chmod +x /server/uniquenamed/uniquenamed
  chmod +x /server/authd/build/authd
  chmod +x /server/gamedbd/gamedbd
  chmod +x /server/backdbd/backdbd
  chmod +x /server/gacd/gacd
  chmod +x /server/gqueryd/gqueryd
  chmod +x /server/gdeliveryd/gdeliveryd
  chmod +x /server/glinkd/glinkd
  chmod +x /server/qd
  chmod -R 777 /server/etc
#  chmod +x /server/gamed/gs
  chmod -R 777 /server/gamed
fi

bash qd &

while true
do
    sleep 10
    echo "sleep"
    tail -f /server/logs/*
done

